<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>湘西旅游 - 我的收藏</title>
  <!-- 引入Tailwind CSS -->
  <script src="https://cdn.tailwindcss.com"></script>
  <!-- 引入Font Awesome -->
  <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">

  <!-- 配置Tailwind自定义主题 -->
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#1A4D2E',      // 湘西靛蓝 - 主色调
            secondary: '#E63946',    // 朱砂红 - 强调色
            accent: '#FFB703',       // 金色 - 点缀色
            neutral: '#F1FAEE',      // 米色 - 背景色
            dark: '#1D3557',         // 深色 - 文本
          },
          fontFamily: {
            sans: ['Inter', 'system-ui', 'sans-serif'],
            display: ['"Ma Shan Zheng"', 'cursive'],
          },
        },
      }
    }
  </script>

  <!-- 引入中文字体 -->
  <link href="https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap" rel="stylesheet">

  <!-- 自定义工具类 -->
  <style type="text/tailwindcss">
    @layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .text-shadow {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
      }
      .card-shadow {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      }
      .bg-pattern {
        background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%231a4d2e' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
      }
      .border-pattern {
        background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0V0zm10 17a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm20 0a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM10 37a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm10-17h20v20H20V20zm10 17a7 7 0 1 0 0-14 7 7 0 0 0 0 14z' fill='%23e63946' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
      }
    }
  </style>
</head>

<body class="bg-neutral bg-pattern min-h-screen text-dark">
  <!-- 成功提示弹窗 -->
  <div id="successToast" class="fixed bottom-6 right-6 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg transform translate-y-20 opacity-0 transition-all duration-300 z-50 flex items-center">
    <i class="fa fa-check-circle mr-2"></i>
    <span id="toastMessage">操作成功</span>
  </div>

  <main class="container mx-auto px-4 py-8">
    <!-- 页面标题 -->
    <div class="text-center mb-10 relative overflow-hidden rounded-lg">
      <div class="absolute inset-0 bg-cover bg-center opacity-20" style="background-image: url('https://picsum.photos/id/1036/1200/300');"></div>
      <h2 class="text-[clamp(1.8rem,5vw,2.8rem)] font-display text-primary relative z-10 py-8">我的收藏</h2>
      <div class="h-1 w-32 bg-secondary mx-auto relative z-10"></div>
    </div>

    <!-- 收藏分类标签 -->
    <div class="mb-8 border-b border-gray-200">
      <div class="flex overflow-x-auto pb-2 scrollbar-hide">
        <button class="category-btn active px-6 py-2 font-medium text-primary border-b-2 border-primary mr-4 whitespace-nowrap" data-category="all">
          全部收藏 <span class="ml-1 bg-primary/10 text-primary text-xs px-2 py-0.5 rounded-full">12</span>
        </button>
        <button class="category-btn px-6 py-2 font-medium text-gray-500 hover:text-primary mr-4 whitespace-nowrap" data-category="attractions">
          景点 <span class="ml-1 bg-gray-100 text-gray-600 text-xs px-2 py-0.5 rounded-full">7</span>
        </button>
        <button class="category-btn px-6 py-2 font-medium text-gray-500 hover:text-primary mr-4 whitespace-nowrap" data-category="guides">
          攻略 <span class="ml-1 bg-gray-100 text-gray-600 text-xs px-2 py-0.5 rounded-full">3</span>
        </button>
        <button class="category-btn px-6 py-2 font-medium text-gray-500 hover:text-primary whitespace-nowrap" data-category="comments">
          评论 <span class="ml-1 bg-gray-100 text-gray-600 text-xs px-2 py-0.5 rounded-full">2</span>
        </button>
      </div>
    </div>

    <div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
      <!-- 左侧：用户信息 -->
      <div class="lg:col-span-1">
        <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-transform duration-300 hover:shadow-xl">
          <!-- 用户信息头部 -->
          <div class="h-36 bg-primary relative">
            <div class="absolute inset-0 opacity-20 bg-cover bg-center" style="background-image: url('https://picsum.photos/id/1039/600/400');"></div>
            <!-- 头像 -->
            <div class="absolute -bottom-16 left-8">
              <div class="w-32 h-32 rounded-full border-4 border-white overflow-hidden shadow-lg">
                <img src="https://picsum.photos/id/64/200/200" alt="用户头像" class="w-full h-full object-cover">
              </div>
            </div>
            <!-- 会员标识 -->
            <div class="absolute top-4 right-4 bg-accent text-primary text-xs font-bold px-3 py-1 rounded-full">
              湘西探索者 Lv.3
            </div>
          </div>

          <!-- 用户信息内容 -->
          <div class="pt-20 pb-6 px-6">
            <div class="text-center mb-4">
              <h3 class="text-xl font-bold">湘西旅行者</h3>
              <p class="text-gray-500 text-sm mt-1">已探索 8 个湘西景点</p>
            </div>

            <p class="text-gray-600 text-sm mb-6 text-center">
              喜欢徒步旅行，探索湘西的神秘山水与民族文化
            </p>

            <!-- 数据统计 -->
            <div class="grid grid-cols-3 gap-2 text-center">
              <div class="p-3">
                <div class="text-primary font-bold text-xl">5</div>
                <div class="text-gray-500 text-xs">评论</div>
              </div>
              <div class="p-3">
                <div class="text-primary font-bold text-xl">3</div>
                <div class="text-gray-500 text-xs">攻略</div>
              </div>
              <div class="p-3">
                <div class="text-primary font-bold text-xl">238</div>
                <div class="text-gray-500 text-xs">获赞</div>
              </div>
            </div>

            <a href="{% url 'user_profile' %}" class="block w-full mt-6 bg-primary hover:bg-primary/90 text-white py-2 rounded-lg transition-colors duration-300 flex items-center justify-center">
              <i class="fa fa-user mr-2"></i> 个人中心
            </a>
          </div>
        </div>

        <!-- 收藏统计 -->
        <div class="bg-white rounded-xl shadow-lg overflow-hidden mt-6 p-6">
          <h3 class="text-lg font-bold mb-4 flex items-center">
            <i class="fa fa-bar-chart text-primary mr-2"></i> 收藏统计
          </h3>

          <div class="space-y-4">
            <div class="flex items-center justify-between">
              <div class="flex items-center">
                <div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary">
                  <i class="fa fa-map-marker"></i>
                </div>
                <div class="ml-3">
                  <div class="font-medium">景点收藏</div>
                  <div class="text-xs text-gray-500">7个景点</div>
                </div>
              </div>
              <div class="w-16 bg-gray-200 rounded-full h-2">
                <div class="bg-primary h-2 rounded-full" style="width: 58%"></div>
              </div>
            </div>

            <div class="flex items-center justify-between">
              <div class="flex items-center">
                <div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary">
                  <i class="fa fa-book"></i>
                </div>
                <div class="ml-3">
                  <div class="font-medium">攻略收藏</div>
                  <div class="text-xs text-gray-500">3篇攻略</div>
                </div>
              </div>
              <div class="w-16 bg-gray-200 rounded-full h-2">
                <div class="bg-primary h-2 rounded-full" style="width: 25%"></div>
              </div>
            </div>

            <div class="flex items-center justify-between">
              <div class="flex items-center">
                <div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary">
                  <i class="fa fa-comment"></i>
                </div>
                <div class="ml-3">
                  <div class="font-medium">评论收藏</div>
                  <div class="text-xs text-gray-500">2条评论</div>
                </div>
              </div>
              <div class="w-16 bg-gray-200 rounded-full h-2">
                <div class="bg-primary h-2 rounded-full" style="width: 17%"></div>
              </div>
            </div>
          </div>

          <div class="mt-6 pt-6 border-t border-gray-100">
            <div class="flex items-center justify-between mb-3">
              <span class="text-sm font-medium">最近收藏</span>
              <span class="text-xs text-gray-500">凤凰古城</span>
            </div>
            <div class="flex items-center justify-between">
              <span class="text-sm font-medium">收藏最多的地区</span>
              <span class="text-xs text-gray-500">张家界</span>
            </div>
          </div>
        </div>
      </div>

      <!-- 右侧：收藏内容区 -->
      <div class="lg:col-span-3 space-y-8">
        <!-- 景点收藏 -->
        <section class="bg-white rounded-xl shadow-lg overflow-hidden" data-section="attractions">
          <div class="border-b border-gray-100 px-6 py-4">
            <h3 class="text-xl font-bold flex items-center">
              <i class="fa fa-map-marker text-primary mr-2"></i> 收藏的景点
            </h3>
          </div>

          <div class="p-6">
            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
              <!-- 收藏景点1 -->
              <div class="flex border border-gray-100 rounded-lg overflow-hidden hover:shadow-md transition-shadow group">
                <div class="w-1/3 relative">
                  <img src="https://picsum.photos/id/1037/300/300" alt="凤凰古城" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                  <button class="absolute top-2 right-2 w-7 h-7 bg-white bg-opacity-80 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="attraction" data-id="1">
                    <i class="fa fa-bookmark"></i>
                  </button>
                </div>
                <div class="w-2/3 p-4">
                  <h4 class="font-bold text-base">凤凰古城</h4>
                  <div class="flex items-center text-yellow-400 text-xs mt-1 mb-2">
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star-half-o"></i>
                    <span class="text-gray-500 ml-1">4.7 (3.2k评价)</span>
                  </div>
                  <p class="text-xs text-gray-600 mb-3">湘西土家族苗族自治州凤凰县</p>
                  <div class="flex flex-wrap gap-2 mb-3">
                    <span class="text-xs bg-blue-100 text-blue-800 px-2 py-0.5 rounded">古镇</span>
                    <span class="text-xs bg-green-100 text-green-800 px-2 py-0.5 rounded">夜景</span>
                    <span class="text-xs bg-purple-100 text-purple-800 px-2 py-0.5 rounded">文化体验</span>
                  </div>
                  <a href="#" class="text-primary text-xs hover:text-primary/80 transition-colors inline-flex items-center">
                    查看详情 <i class="fa fa-angle-right ml-1"></i>
                  </a>
                </div>
              </div>

              <!-- 收藏景点2 -->
              <div class="flex border border-gray-100 rounded-lg overflow-hidden hover:shadow-md transition-shadow group">
                <div class="w-1/3 relative">
                  <img src="https://picsum.photos/id/1038/300/300" alt="张家界国家森林公园" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                  <button class="absolute top-2 right-2 w-7 h-7 bg-white bg-opacity-80 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="attraction" data-id="2">
                    <i class="fa fa-bookmark"></i>
                  </button>
                </div>
                <div class="w-2/3 p-4">
                  <h4 class="font-bold text-base">张家界国家森林公园</h4>
                  <div class="flex items-center text-yellow-400 text-xs mt-1 mb-2">
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <span class="text-gray-500 ml-1">4.9 (5.8k评价)</span>
                  </div>
                  <p class="text-xs text-gray-600 mb-3">张家界市武陵源区</p>
                  <div class="flex flex-wrap gap-2 mb-3">
                    <span class="text-xs bg-green-100 text-green-800 px-2 py-0.5 rounded">自然风光</span>
                    <span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded">徒步</span>
                    <span class="text-xs bg-red-100 text-red-800 px-2 py-0.5 rounded">世界遗产</span>
                  </div>
                  <a href="#" class="text-primary text-xs hover:text-primary/80 transition-colors inline-flex items-center">
                    查看详情 <i class="fa fa-angle-right ml-1"></i>
                  </a>
                </div>
              </div>

              <!-- 收藏景点3 -->
              <div class="flex border border-gray-100 rounded-lg overflow-hidden hover:shadow-md transition-shadow group">
                <div class="w-1/3 relative">
                  <img src="https://picsum.photos/id/1080/300/300" alt="芙蓉镇" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                  <button class="absolute top-2 right-2 w-7 h-7 bg-white bg-opacity-80 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="attraction" data-id="3">
                    <i class="fa fa-bookmark"></i>
                  </button>
                </div>
                <div class="w-2/3 p-4">
                  <h4 class="font-bold text-base">芙蓉镇</h4>
                  <div class="flex items-center text-yellow-400 text-xs mt-1 mb-2">
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star-o"></i>
                    <span class="text-gray-500 ml-1">4.3 (1.5k评价)</span>
                  </div>
                  <p class="text-xs text-gray-600 mb-3">湘西州永顺县</p>
                  <div class="flex flex-wrap gap-2 mb-3">
                    <span class="text-xs bg-blue-100 text-blue-800 px-2 py-0.5 rounded">古镇</span>
                    <span class="text-xs bg-cyan-100 text-cyan-800 px-2 py-0.5 rounded">瀑布</span>
                    <span class="text-xs bg-orange-100 text-orange-800 px-2 py-0.5 rounded">美食</span>
                  </div>
                  <a href="#" class="text-primary text-xs hover:text-primary/80 transition-colors inline-flex items-center">
                    查看详情 <i class="fa fa-angle-right ml-1"></i>
                  </a>
                </div>
              </div>

              <!-- 收藏景点4 -->
              <div class="flex border border-gray-100 rounded-lg overflow-hidden hover:shadow-md transition-shadow group">
                <div class="w-1/3 relative">
                  <img src="https://picsum.photos/id/1018/300/300" alt="天门山国家森林公园" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                  <button class="absolute top-2 right-2 w-7 h-7 bg-white bg-opacity-80 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="attraction" data-id="4">
                    <i class="fa fa-bookmark"></i>
                  </button>
                </div>
                <div class="w-2/3 p-4">
                  <h4 class="font-bold text-base">天门山国家森林公园</h4>
                  <div class="flex items-center text-yellow-400 text-xs mt-1 mb-2">
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star"></i>
                    <i class="fa fa-star-half-o"></i>
                    <span class="text-gray-500 ml-1">4.7 (3.2k评价)</span>
                  </div>
                  <p class="text-xs text-gray-600 mb-3">张家界市永定区</p>
                  <div class="flex flex-wrap gap-2 mb-3">
                    <span class="text-xs bg-green-100 text-green-800 px-2 py-0.5 rounded">自然风光</span>
                    <span class="text-xs bg-purple-100 text-purple-800 px-2 py-0.5 rounded">索道</span>
                    <span class="text-xs bg-red-100 text-red-800 px-2 py-0.5 rounded">玻璃栈道</span>
                  </div>
                  <a href="#" class="text-primary text-xs hover:text-primary/80 transition-colors inline-flex items-center">
                    查看详情 <i class="fa fa-angle-right ml-1"></i>
                  </a>
                </div>
              </div>
            </div>

            <!-- 更多景点按钮 -->
            <div class="mt-6 text-center">
              <button id="loadMoreAttractions" class="bg-white border border-gray-300 text-gray-700 hover:bg-gray-50 px-6 py-2 rounded-lg text-sm font-medium transition-colors">
                加载更多 <i class="fa fa-angle-down ml-1"></i>
              </button>
            </div>
          </div>
        </section>

        <!-- 攻略收藏 -->
        <section class="bg-white rounded-xl shadow-lg overflow-hidden" data-section="guides">
          <div class="border-b border-gray-100 px-6 py-4">
            <h3 class="text-xl font-bold flex items-center">
              <i class="fa fa-book text-secondary mr-2"></i> 收藏的攻略
            </h3>
          </div>

          <div class="p-6">
            <div class="space-y-6">
              <!-- 收藏攻略1 -->
              <div class="border border-gray-100 rounded-lg overflow-hidden hover:shadow-md transition-shadow relative">
                <button class="absolute top-4 right-4 w-7 h-7 bg-white bg-opacity-80 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="guide" data-id="1">
                  <i class="fa fa-bookmark"></i>
                </button>
                <div class="md:flex">
                  <div class="md:w-1/3">
                    <div class="h-48 md:h-full">
                      <img src="https://picsum.photos/id/1037/600/400" alt="凤凰古城三日游攻略" class="w-full h-full object-cover hover:scale-105 transition-transform duration-500">
                    </div>
                  </div>
                  <div class="md:w-2/3 p-5">
                    <div class="flex justify-between items-start mb-2">
                      <h4 class="font-bold text-lg">凤凰古城三日深度游攻略</h4>
                      <span class="bg-primary/10 text-primary text-xs px-2 py-1 rounded">热门</span>
                    </div>
                    <div class="flex items-center text-sm text-gray-500 mb-3">
                      <span class="flex items-center mr-4">
                        <i class="fa fa-map-marker text-primary mr-1"></i> 凤凰古城
                      </span>
                      <span class="flex items-center mr-4">
                        <i class="fa fa-calendar text-primary mr-1"></i> 发布于 2023-09-18
                      </span>
                      <span class="flex items-center">
                        <i class="fa fa-user text-primary mr-1"></i> 湘西行者
                      </span>
                    </div>
                    <p class="text-gray-600 text-sm mb-4 line-clamp-2">
                      这篇攻略将带您深入了解凤凰古城的必游景点、特色美食和住宿推荐。从古城墙到沈从文故居，从沱江泛舟到篝火晚会，让您的凤凰之旅不留遗憾...
                    </p>
                    <div class="flex items-center space-x-4 text-sm">
                      <span class="flex items-center text-gray-500">
                        <i class="fa fa-eye text-primary mr-1"></i> 2.3k 阅读
                      </span>
                      <span class="flex items-center text-gray-500">
                        <i class="fa fa-thumbs-up text-primary mr-1"></i> 156
                      </span>
                      <span class="flex items-center text-gray-500">
                        <i class="fa fa-comment-o mr-1"></i> 32
                      </span>
                    </div>
                  </div>
                </div>
              </div>

              <!-- 收藏攻略2 -->
              <div class="border border-gray-100 rounded-lg overflow-hidden hover:shadow-md transition-shadow relative">
                <button class="absolute top-4 right-4 w-7 h-7 bg-white bg-opacity-80 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="guide" data-id="2">
                  <i class="fa fa-bookmark"></i>
                </button>
                <div class="md:flex">
                  <div class="md:w-1/3">
                    <div class="h-48 md:h-full">
                      <img src="https://picsum.photos/id/1038/600/400" alt="张家界徒步攻略" class="w-full h-full object-cover hover:scale-105 transition-transform duration-500">
                    </div>
                  </div>
                  <div class="md:w-2/3 p-5">
                    <div class="flex justify-between items-start mb-2">
                      <h4 class="font-bold text-lg">张家界精华徒步路线指南</h4>
                      <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded">实用</span>
                    </div>
                    <div class="flex items-center text-sm text-gray-500 mb-3">
                      <span class="flex items-center mr-4">
                        <i class="fa fa-map-marker text-primary mr-1"></i> 张家界国家森林公园
                      </span>
                      <span class="flex items-center mr-4">
                        <i class="fa fa-calendar text-primary mr-1"></i> 发布于 2023-08-25
                      </span>
                      <span class="flex items-center">
                        <i class="fa fa-user text-primary mr-1"></i> 山水户外
                      </span>
                    </div>
                    <p class="text-gray-600 text-sm mb-4 line-clamp-2">
                      为徒步爱好者整理的张家界精华路线，包含袁家界、杨家界、天子山等区域的最佳徒步路径，详细说明各路段难度、所需时间和风景亮点...
                    </p>
                    <div class="flex items-center space-x-4 text-sm">
                      <span class="flex items-center text-gray-500">
                        <i class="fa fa-eye text-primary mr-1"></i> 1.8k 阅读
                      </span>
                      <span class="flex items-center text-gray-500">
                        <i class="fa fa-thumbs-up text-primary mr-1"></i> 124
                      </span>
                      <span class="flex items-center text-gray-500">
                        <i class="fa fa-comment-o mr-1"></i> 27
                      </span>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </section>

        <!-- 评论收藏 -->
        <section class="bg-white rounded-xl shadow-lg overflow-hidden" data-section="comments">
          <div class="border-b border-gray-100 px-6 py-4">
            <h3 class="text-xl font-bold flex items-center">
              <i class="fa fa-comment text-primary mr-2"></i> 收藏的评论
            </h3>
          </div>

          <div class="p-6">
            <!-- 收藏评论1 -->
            <div class="border-b border-gray-100 pb-6 mb-6">
              <div class="flex">
                <div class="w-1/5 md:w-1/6 mb-4 md:mb-0">
                  <img src="https://picsum.photos/id/1037/300/300" alt="凤凰古城" class="w-full h-24 object-cover rounded-lg">
                </div>
                <div class="w-4/5 md:w-5/6 md:pl-6 relative">
                  <button class="absolute top-0 right-0 w-7 h-7 bg-gray-100 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="comment" data-id="1">
                    <i class="fa fa-bookmark"></i>
                  </button>
                  <div class="flex justify-between">
                    <h4 class="font-bold">凤凰古城</h4>
                    <div class="flex text-yellow-400">
                      <i class="fa fa-star"></i>
                      <i class="fa fa-star"></i>
                      <i class="fa fa-star"></i>
                      <i class="fa fa-star"></i>
                      <i class="fa fa-star"></i>
                    </div>
                  </div>
                  <div class="flex items-center text-sm text-gray-500 mb-2">
                    <img src="https://picsum.photos/id/91/100/100" alt="用户头像" class="w-5 h-5 rounded-full mr-2">
                    <span>旅行者小明</span>
                    <span class="mx-2">·</span>
                    <span>评论于 2023年9月5日</span>
                  </div>
                  <p class="text-gray-700 text-sm mb-4">
                    作为一个摄影爱好者，凤凰古城的清晨和黄昏是最佳拍摄时间。特别是在北门码头附近，晨雾中的吊脚楼宛如仙境。建议携带三脚架，拍摄沱江倒影会非常出彩。当地摄影师告诉我，雨后初晴的天气最适合拍摄。
                  </p>
                  <div class="flex items-center text-sm text-gray-500">
                    <span class="flex items-center mr-4">
                      <i class="fa fa-thumbs-up text-primary mr-1"></i> 128
                    </span>
                    <span class="flex items-center">
                      <i class="fa fa-comment-o mr-1"></i> 24 条回复
                    </span>
                  </div>
                </div>
              </div>
            </div>

            <!-- 收藏评论2 -->
            <div>
              <div class="flex">
                <div class="w-1/5 md:w-1/6 mb-4 md:mb-0">
                  <img src="https://picsum.photos/id/1080/300/300" alt="芙蓉镇" class="w-full h-24 object-cover rounded-lg">
                </div>
                <div class="w-4/5 md:w-5/6 md:pl-6 relative">
                  <button class="absolute top-0 right-0 w-7 h-7 bg-gray-100 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="comment" data-id="2">
                    <i class="fa fa-bookmark"></i>
                  </button>
                  <div class="flex justify-between">
                    <h4 class="font-bold">芙蓉镇</h4>
                    <div class="flex text-yellow-400">
                      <i class="fa fa-star"></i>
                      <i class="fa fa-star"></i>
                      <i class="fa fa-star"></i>
                      <i class="fa fa-star"></i>
                      <i class="fa fa-star-o"></i>
                    </div>
                  </div>
                  <div class="flex items-center text-sm text-gray-500 mb-2">
                    <img src="https://picsum.photos/id/65/100/100" alt="用户头像" class="w-5 h-5 rounded-full mr-2">
                    <span>美食探险家</span>
                    <span class="mx-2">·</span>
                    <span>评论于 2023年8月17日</span>
                  </div>
                  <p class="text-gray-700 text-sm mb-4">
                    芙蓉镇的米豆腐有三家最出名：镇口的"张记"、瀑布边的"胡师傅"和老街的"王婆婆"。个人推荐"胡师傅"家的，他们的辣椒是特制的，香而不辣。另外，镇上的腊肉炒蕨菜和酸萝卜也值得一试，最好在早上9点前去老街的菜市场买，最新鲜。
                  </p>
                  <div class="flex items-center text-sm text-gray-500">
                    <span class="flex items-center mr-4">
                      <i class="fa fa-thumbs-up text-primary mr-1"></i> 95
                    </span>
                    <span class="flex items-center">
                      <i class="fa fa-comment-o mr-1"></i> 16 条回复
                    </span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </section>
      </div>
    </div>
  </main>

  <!-- 页脚 -->
  <footer class="bg-primary text-white mt-16 border-pattern">
    <div class="container mx-auto px-4 py-10">
      <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
        <div>
          <h3 class="text-xl font-display mb-4">湘西之旅</h3>
          <p class="text-gray-300 text-sm">探索湘西秘境，感受土家族、苗族文化魅力，发现不一样的湖南西部风情。</p>
          <div class="flex space-x-4 mt-4">
            <a href="#" class="text-gray-300 hover:text-accent transition-colors">
              <i class="fa fa-weibo"></i>
            </a>
            <a href="#" class="text-gray-300 hover:text-accent transition-colors">
              <i class="fa fa-wechat"></i>
            </a>
            <a href="#" class="text-gray-300 hover:text-accent transition-colors">
              <i class="fa fa-instagram"></i>
            </a>
            <a href="#" class="text-gray-300 hover:text-accent transition-colors">
              <i class="fa fa-youtube-play"></i>
            </a>
          </div>
        </div>

        <div>
          <h4 class="text-lg font-medium mb-4">快速链接</h4>
          <ul class="space-y-2 text-sm text-gray-300">
            <li><a href="#" class="hover:text-accent transition-colors">首页</a></li>
            <li><a href="#" class="hover:text-accent transition-colors">景点大全</a></li>
            <li><a href="#" class="hover:text-accent transition-colors">旅游攻略</a></li>
            <li><a href="#" class="hover:text-accent transition-colors">美食推荐</a></li>
            <li><a href="#" class="hover:text-accent transition-colors">民俗文化</a></li>
          </ul>
        </div>

        <div>
          <h4 class="text-lg font-medium mb-4">热门目的地</h4>
          <ul class="space-y-2 text-sm text-gray-300">
            <li><a href="#" class="hover:text-accent transition-colors">凤凰古城</a></li>
            <li><a href="#" class="hover:text-accent transition-colors">张家界</a></li>
            <li><a href="#" class="hover:text-accent transition-colors">芙蓉镇</a></li>
            <li><a href="#" class="hover:text-accent transition-colors">德夯苗寨</a></li>
            <li><a href="#" class="hover:text-accent transition-colors">里耶古城</a></li>
          </ul>
        </div>

        <div>
          <h4 class="text-lg font-medium mb-4">联系我们</h4>
          <ul class="space-y-2 text-sm text-gray-300">
            <li class="flex items-start">
              <i class="fa fa-map-marker mt-1 mr-2"></i>
              <span>湖南省湘西土家族苗族自治州吉首市</span>
            </li>
            <li class="flex items-center">
              <i class="fa fa-phone mr-2"></i>
              <span>400-123-4567</span>
            </li>
            <li class="flex items-center">
              <i class="fa fa-envelope mr-2"></i>
              <span>info@xiangxitrip.com</span>
            </li>
          </ul>
        </div>
      </div>

      <div class="border-t border-gray-700 mt-8 pt-6 text-center text-sm text-gray-400">
        <p>© 2023 湘西之旅 版权所有 | 湘ICP备12345678号</p>
      </div>
    </div>
  </footer>

  <!-- JavaScript -->
  <script>
    // 显示提示消息
    function showToast(message) {
      const toastMessage = document.getElementById('toastMessage');
      const successToast = document.getElementById('successToast');

      toastMessage.textContent = message;
      successToast.classList.remove('translate-y-20', 'opacity-0');
      successToast.classList.add('translate-y-0', 'opacity-100');

      setTimeout(() => {
        successToast.classList.remove('translate-y-0', 'opacity-100');
        successToast.classList.add('translate-y-20', 'opacity-0');
      }, 3000);
    }

    // 收藏分类切换
    const categoryBtns = document.querySelectorAll('.category-btn');
    const sections = document.querySelectorAll('[data-section]');

    categoryBtns.forEach(btn => {
      btn.addEventListener('click', function() {
        // 移除所有按钮的活跃状态
        categoryBtns.forEach(b => {
          b.classList.remove('active', 'text-primary', 'border-b-2', 'border-primary');
          b.classList.add('text-gray-500');
        });

        // 添加当前按钮的活跃状态
        this.classList.add('active', 'text-primary', 'border-b-2', 'border-primary');
        this.classList.remove('text-gray-500');

        const category = this.getAttribute('data-category');

        // 显示或隐藏对应分类的内容
        sections.forEach(section => {
          if (category === 'all' || section.getAttribute('data-section') === category) {
            section.style.display = 'block';
          } else {
            section.style.display = 'none';
          }
        });
      });
    });

    // 移除收藏功能
    const removeFavoriteBtns = document.querySelectorAll('.remove-favorite-btn');

    removeFavoriteBtns.forEach(btn => {
      btn.addEventListener('click', function() {
        const type = this.getAttribute('data-type');
        const id = this.getAttribute('data-id');
        const item = this.closest('.flex, .border');

        if (confirm('确定要取消收藏吗？')) {
          // 添加淡出动画
          item.classList.add('opacity-0', 'transition-opacity', 'duration-300');

          // 动画结束后移除元素
          setTimeout(() => {
            item.remove();

            // 更新收藏数量统计
            updateFavoriteCounts(type);

            // 显示提示
            showToast('已取消收藏');
          }, 300);
        }
      });
    });

    // 更新收藏数量统计
    function updateFavoriteCounts(type) {
      // 这里只是模拟更新，实际应用中应该从服务器获取最新数据
      const allCountEl = document.querySelector('[data-category="all"] span');
      const typeCountEl = document.querySelector(`[data-category="${type}"] span`);

      if (allCountEl) {
        let count = parseInt(allCountEl.textContent);
        allCountEl.textContent = count > 0 ? count - 1 : 0;
      }

      if (typeCountEl) {
        let count = parseInt(typeCountEl.textContent);
        typeCountEl.textContent = count > 0 ? count - 1 : 0;
      }
    }

    // 加载更多景点
    document.getElementById('loadMoreAttractions').addEventListener('click', function() {
      this.innerHTML = '<i class="fa fa-spinner fa-spin mr-1"></i> 加载中...';

      // 模拟加载延迟
      setTimeout(() => {
        const container = document.querySelector('[data-section="attractions"] .grid');

        // 新景点1
        const newAttraction1 = document.createElement('div');
        newAttraction1.className = 'flex border border-gray-100 rounded-lg overflow-hidden hover:shadow-md transition-shadow group';
        newAttraction1.innerHTML = `
          <div class="w-1/3 relative">
            <img src="https://picsum.photos/id/1039/300/300" alt="德夯苗寨" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
            <button class="absolute top-2 right-2 w-7 h-7 bg-white bg-opacity-80 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="attraction" data-id="5">
              <i class="fa fa-bookmark"></i>
            </button>
          </div>
          <div class="w-2/3 p-4">
            <h4 class="font-bold text-base">德夯苗寨</h4>
            <div class="flex items-center text-yellow-400 text-xs mt-1 mb-2">
              <i class="fa fa-star"></i>
              <i class="fa fa-star"></i>
              <i class="fa fa-star"></i>
              <i class="fa fa-star"></i>
              <i class="fa fa-star-o"></i>
              <span class="text-gray-500 ml-1">4.2 (1.3k评价)</span>
            </div>
            <p class="text-xs text-gray-600 mb-3">湘西州吉首市德夯大峡谷</p>
            <div class="flex flex-wrap gap-2 mb-3">
              <span class="text-xs bg-orange-100 text-orange-800 px-2 py-0.5 rounded">苗族文化</span>
              <span class="text-xs bg-green-100 text-green-800 px-2 py-0.5 rounded">自然风光</span>
              <span class="text-xs bg-purple-100 text-purple-800 px-2 py-0.5 rounded">民俗表演</span>
            </div>
            <a href="#" class="text-primary text-xs hover:text-primary/80 transition-colors inline-flex items-center">
              查看详情 <i class="fa fa-angle-right ml-1"></i>
            </a>
          </div>
        `;

        // 新景点2
        const newAttraction2 = document.createElement('div');
        newAttraction2.className = 'flex border border-gray-100 rounded-lg overflow-hidden hover:shadow-md transition-shadow group';
        newAttraction2.innerHTML = `
          <div class="w-1/3 relative">
            <img src="https://picsum.photos/id/1043/300/300" alt="里耶古城" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
            <button class="absolute top-2 right-2 w-7 h-7 bg-white bg-opacity-80 rounded-full flex items-center justify-center text-secondary hover:text-red-700 transition-colors remove-favorite-btn" data-type="attraction" data-id="6">
              <i class="fa fa-bookmark"></i>
            </button>
          </div>
          <div class="w-2/3 p-4">
            <h4 class="font-bold text-base">里耶古城</h4>
            <div class="flex items-center text-yellow-400 text-xs mt-1 mb-2">
              <i class="fa fa-star"></i>
              <i class="fa fa-star"></i>
              <i class="fa fa-star"></i>
              <i class="fa fa-star"></i>
              <i class="fa fa-star-o"></i>
              <span class="text-gray-500 ml-1">4.1 (856评价)</span>
            </div>
            <p class="text-xs text-gray-600 mb-3">湘西州龙山县里耶镇</p>
            <div class="flex flex-wrap gap-2 mb-3">
              <span class="text-xs bg-blue-100 text-blue-800 px-2 py-0.5 rounded">古镇</span>
              <span class="text-xs bg-red-100 text-red-800 px-2 py-0.5 rounded">历史遗迹</span>
              <span class="text-xs bg-gray-100 text-gray-800 px-2 py-0.5 rounded">小众景点</span>
            </div>
            <a href="#" class="text-primary text-xs hover:text-primary/80 transition-colors inline-flex items-center">
              查看详情 <i class="fa fa-angle-right ml-1"></i>
            </a>
          </div>
        `;

        // 添加新景点并绑定事件
        container.appendChild(newAttraction1);
        container.appendChild(newAttraction2);

        // 为新添加的删除按钮绑定事件
        const newRemoveBtns = container.querySelectorAll('.remove-favorite-btn:not([data-bound="true"])');
        newRemoveBtns.forEach(btn => {
          btn.setAttribute('data-bound', 'true');
          btn.addEventListener('click', function() {
            const type = this.getAttribute('data-type');
            const id = this.getAttribute('data-id');
            const item = this.closest('.flex');

            if (confirm('确定要取消收藏吗？')) {
              item.classList.add('opacity-0', 'transition-opacity', 'duration-300');
              setTimeout(() => {
                item.remove();
                updateFavoriteCounts(type);
                showToast('已取消收藏');
              }, 300);
            }
          });
        });

        // 更新按钮状态
        this.innerHTML = '没有更多了';
        this.disabled = true;
        this.classList.add('opacity-50', 'cursor-not-allowed');
      }, 1500);
    });

    // 添加卡片悬停动画效果
    const cards = document.querySelectorAll('.shadow-lg');
    cards.forEach(card => {
      card.addEventListener('mouseenter', function() {
        this.classList.add('transform', 'translate-y-[-5px]', 'transition-all', 'duration-300');
      });
      card.addEventListener('mouseleave', function() {
        this.classList.remove('transform', 'translate-y-[-5px]');
      });
    });
  </script>
</body>
</html>
